🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / feature / map / src / commonMain / kotlin / org / meshtastic / feature / map / component / OfflineStatusBanner.kt
Displaying Raw • Download
feature/map/src/commonMain/kotlin/org/meshtastic/feature/map/component/OfflineStatusBanner.kt renovate/fastlane-2.x-lockfile (056eed64) Text, 3.30 KB
T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.feature.map.component
Tff7b72import T7ee787androidx.compose.animation.AnimatedVisibility
Tff7b72import T7ee787androidx.compose.animation.fadeIn
Tff7b72import T7ee787androidx.compose.animation.fadeOut
Tff7b72import T7ee787androidx.compose.foundation.layout.Row
Tff7b72import T7ee787androidx.compose.foundation.layout.padding
Tff7b72import T7ee787androidx.compose.material3.Icon
Tff7b72import T7ee787androidx.compose.material3.MaterialTheme
Tff7b72import T7ee787androidx.compose.material3.Surface
Tff7b72import T7ee787androidx.compose.material3.Text
Tff7b72import T7ee787androidx.compose.runtime.Composable
Tff7b72import T7ee787androidx.compose.ui.Alignment
Tff7b72import T7ee787androidx.compose.ui.Modifier
Tff7b72import T7ee787androidx.compose.ui.unit.dp
Tff7b72import T7ee787org.jetbrains.compose.resources.stringResource
Tff7b72import T7ee787org.meshtastic.core.resources.Res
Tff7b72import T7ee787org.meshtastic.core.resources.map_offline_banner
Tff7b72import T7ee787org.meshtastic.core.ui.icon.MeshtasticIcons
Tff7b72import T7ee787org.meshtastic.core.ui.icon.OfflineShare
T8b949e/**
* A small pill reporting that the device has no network connection right now.
*
* Purely informational — neither map backend needs this composable to keep rendering offline. MapLibre already serves
* any tile it holds (an offline pack or its own ambient cache) straight from disk the instant a network fetch fails,
* and the Google flavor's auto-switch to a local basemap (see `MapViewModel.handleConnectivityChange`) happens
* independently of whether this is on screen. It exists only so a blank or stale-looking map reads as "you're offline"
* rather than as a bug.
*/
Tf0883e@Composable
Tff7b72fun Td2a8ffOfflineStatusBannerTb4b4b4(Te6edf3visibleTb4b4b4: Tffa657BooleanTb4b4b4, Te6edf3modifierTb4b4b4: Te6edf3Modifier Tff7b72= Te6edf3ModifierTb4b4b4) Tb4b4b4{
Te6edf3AnimatedVisibilityTb4b4b4(Te6edf3visible Tff7b72= Te6edf3visibleTb4b4b4, Te6edf3modifier Tff7b72= Te6edf3modifierTb4b4b4, Te6edf3enter Tff7b72= Te6edf3fadeInTb4b4b4(Tb4b4b4)Tb4b4b4, Te6edf3exit Tff7b72= Te6edf3fadeOutTb4b4b4(Tb4b4b4)Tb4b4b4) Tb4b4b4{
Te6edf3SurfaceTb4b4b4(
Te6edf3shape Tff7b72= Te6edf3MaterialThemeTb4b4b4.Te6edf3shapesTb4b4b4.Te6edf3smallTb4b4b4,
Te6edf3color Tff7b72= Te6edf3MaterialThemeTb4b4b4.Te6edf3colorSchemeTb4b4b4.Te6edf3surfaceVariantTb4b4b4,
Te6edf3tonalElevation Tff7b72= Te6edf3OFFLINE_BANNER_ELEVATIONTb4b4b4,
Tb4b4b4) Tb4b4b4{
Te6edf3RowTb4b4b4(
Te6edf3modifier Tff7b72= Te6edf3ModifierTb4b4b4.Te6edf3paddingTb4b4b4(Te6edf3horizontal Tff7b72= T79c0ff1T79c0ff2.Te6edf3dpTb4b4b4, Te6edf3vertical Tff7b72= T79c0ff6.Te6edf3dpTb4b4b4)Tb4b4b4,
Te6edf3verticalAlignment Tff7b72= Te6edf3AlignmentTb4b4b4.Te6edf3CenterVerticallyTb4b4b4,
Tb4b4b4) Tb4b4b4{
Te6edf3IconTb4b4b4(
Te6edf3imageVector Tff7b72= Te6edf3MeshtasticIconsTb4b4b4.Te6edf3OfflineShareTb4b4b4,
Te6edf3contentDescription Tff7b72= Tff7b72nullTb4b4b4,
Te6edf3tint Tff7b72= Te6edf3MaterialThemeTb4b4b4.Te6edf3colorSchemeTb4b4b4.Te6edf3onSurfaceVariantTb4b4b4,
Te6edf3modifier Tff7b72= Te6edf3ModifierTb4b4b4.Te6edf3paddingTb4b4b4(Te6edf3end Tff7b72= T79c0ff6.Te6edf3dpTb4b4b4)Tb4b4b4,
Tb4b4b4)
Te6edf3TextTb4b4b4(
Te6edf3text Tff7b72= Te6edf3stringResourceTb4b4b4(Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3map_offline_bannerTb4b4b4)Tb4b4b4,
Te6edf3style Tff7b72= Te6edf3MaterialThemeTb4b4b4.Te6edf3typographyTb4b4b4.Te6edf3labelMediumTb4b4b4,
Te6edf3color Tff7b72= Te6edf3MaterialThemeTb4b4b4.Te6edf3colorSchemeTb4b4b4.Te6edf3onSurfaceVariantTb4b4b4,
Tb4b4b4)
Tb4b4b4}
Tb4b4b4}
Tb4b4b4}
Tb4b4b4}
Tff7b72private Tff7b72val Te6edf3OFFLINE_BANNER_ELEVATION Tff7b72= T79c0ff2.Te6edf3dp
Served by rngit 1.5.2 - Generated in 0.27s